//
//  CTMediator+WSUserCenterAction.m
//  CharonTVProject
//
//  Created by karong on 2023/8/4.
//

#import "CTMediator+WSUserCenterAction.h"
///類名
NSString * const WSCTMediatorTargetUserCenter = @"UserCenter";
///方法名
NSString * const WSCTMediatorActioncharonTV_Purchase = @"charonTV_purchase";
//NSString * const WSCTMediatorActioncharonTV_Vip = @"charonTV_vip";
NSString * const WSCTMediatorActioncharonTV_UserInfo = @"charonTV_userInfo";
NSString * const WSCTMediatorActioncharonTV_UserSex = @"charonTV_userSex";
NSString * const WSCTMediatorActioncharonTV_UserAvatar = @"charonTV_userAvatar";
NSString * const WSCTMediatorActioncharonTV_Setting = @"charonTV_setting";
NSString * const WSCTMediatorActioncharonTV_Account = @"charonTV_account";
NSString * const WSCTMediatorActioncharonTV_Updata = @"charonTV_updata";
NSString * const WSCTMediatorActioncharonTV_Like = @"charonTV_like";
NSString * const WSCTMediatorActioncharonTV_Feedback = @"charonTV_feedback";
NSString * const WSCTMediatorActioncharonTV_CoinRecords = @"charonTV_coinRecords";
NSString * const WSCTMediatorActioncharonTV_CoinRecordsItem = @"charonTV_coinRecordsItem";
NSString * const WSCTMediatorActioncharonTV_DelUser = @"charonTV_delUser";

@implementation CTMediator (WSUserCenterAction)

- (UIViewController *)ct_showcharonTV_PurchaseVCWithIndex:(NSInteger)index {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_Purchase
                        params:@{@"index":@(index)}
             shouldCacheTarget:YES];
}
//
//- (UIViewController *)ct_showcharonTV_VipVC {
//    return [self performTarget:WSCTMediatorTargetUserCenter
//                        action:WSCTMediatorActioncharonTV_Vip
//                        params:@{}
//             shouldCacheTarget:YES];
//}


- (UIViewController *)ct_showcharonTV_UserInfoWithUser:(WSUser *)user {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_UserInfo
                        params:@{@"user":user}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_UserSexWithSelectSexHandle:(charonTV_IntegerBlock)selectSexHandle {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_UserSex
                        params:@{@"selectSexHandle":selectSexHandle}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_UserAvatarWithSelectAvatarHandle:(charonTV_IntegerBlock)selectSexHandle {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_UserAvatar
                        params:@{@"selectSexHandle":selectSexHandle}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_Setting {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_Setting
                        params:@{}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_Account {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_Account
                        params:@{}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_Updata {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_Updata
                        params:@{}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_Like {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_Like
                        params:@{}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_Feedback {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_Feedback
                        params:@{}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_CoinRecords {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_CoinRecords
                        params:@{}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_CoinRecordsItemWithType:(NSInteger)type {
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_CoinRecordsItem
                        params:@{@"type":@(type)}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_DelUertAlterWithTitle:(NSString *)title content:(NSString *)content confirm:(NSString *)confirm confirmHandle:(charonTV_EmptyBlock)confirmHandle cancel:(NSString *)cancel {
    NSMutableDictionary * params = [NSMutableDictionary new];
    if (!WSIsNullOrEmpty(title))params[@"titleStr"] = title;
    if (!WSIsNullOrEmpty(content))params[@"content"] = content;
    if (!WSIsNullOrEmpty(confirm))params[@"confirm"] = confirm;
    if (!WSIsNullOrEmpty(cancel))params[@"cancel"] = cancel;
    if (confirmHandle)params[@"confirmHandle"] = confirmHandle;
    return [self performTarget:WSCTMediatorTargetUserCenter
                        action:WSCTMediatorActioncharonTV_DelUser
                        params:params
             shouldCacheTarget:YES];
}
@end
